<template>
  <BasicModal @register="registerModal" title="Cron表达式" width="800px" @ok="onOk">
    <EasyCron v-bind="attrs" :class="prefixCls"/>
  </BasicModal>
</template>

<script lang="ts">
import {defineComponent} from 'vue';
import {useDesign} from '/@/hooks/web/useDesign';
import {useAttrs} from '/@/hooks/core/useAttrs';
import {BasicModal, useModalInner} from '/@/components/Modal';
import EasyCron from './EasyCronInner.vue';

export default defineComponent({
    name: 'EasyCronModal',
    inheritAttrs: false,
    components: { BasicModal, EasyCron },
    setup() {
      const attrs = useAttrs();
      const { prefixCls } = useDesign('easy-cron-modal');
      const [registerModal, { closeModal }] = useModalInner();

      function onOk() {
        closeModal();
      }

      return { attrs, prefixCls, registerModal, onOk };
    },
  });
</script>

<style lang="less">
@prefix-cls: ~'@{namespace}-easy-cron-modal';

.@{prefix-cls} {
  margin: 10px;
}
</style>
